import request from "@/plugins/axios";
// 列表
export function listApi(data) {
  return request({
    url: "/admin/user/index",
    method: "post",
    data,
  });
}
// 列表2
export function deptUserApi(data) {
  return request({
    url: "/admin/department/users",
    method: "post",
    data,
  });
}
// 创建
export function addApi(data) {
  return request({
    url: "/admin/user/create",
    method: "post",
    data,
  });
}

// 修改
export function saveApi(data) {
  return request({
    url: "/admin/user/save",
    method: "post",
    data,
  });
}
// 修改员工状态
export function stateApi(data) {
  return request({
    url: "/admin/user/state",
    method: "post",
    data,
  });
}
// 修改离职
export function quitApi(data) {
  return request({
    url: "/admin/user/quit",
    method: "post",
    data,
  });
}
// 订单通知
export function qyvxSendApi(data) {
  return request({
    url: "/admin/user/qyvxSend",
    method: "post",
    data,
  });
}
// 删除员工
export function delApi(data) {
  return request({
    url: "/admin/user/delete",
    method: "post",
    data,
  });
}
//
export function treePersonApi() {
  return request({
    url: "/admin/department/tree",
  });
}
// 修改密码
export function chgPswdApi(data) {
  return request({
    url: "/admin/user/chgPswd",
    method: "post",
    data,
  });
}
// 导入
export function importApi(data) {
  return request({
    url: "/admin/user/import",
    method: "post",
    data,
  });
}
// 导出
export function exportApi(data) {
  return request({
    url: "/admin/user/export",
    method: "post",
    data,
    responseType: "blob",
  });
}
